GLSP-1636: Fix Theia e2e web-server launch across yarn and pnpm#59
Merged
Conversation
The `theia` project web-server launches the `theia` binary inside the cloned glsp-theia-integration repo. pnpm's script shorthand only runs package.json scripts, so the binary must be invoked via `pnpm exec` (otherwise ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL); yarn classic runs binaries directly and has no `exec` command. Since the e2e clones the integration repo's default branch, which is still yarn mid-migration, neither form works for both. - Detect the cloned repo's package manager via its lockfile and add `exec` only for pnpm - Mark as temporary, to be removed together with the existing yarn workaround in scripts/setup.ts once all repos are on pnpm Part of: eclipse-glsp/glsp#1636
65ecf3c to
9744d97
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Follow-up to the pnpm migration (#58). The
theiaPlaywright project's web-server launches thetheiabinary inside the clonedglsp-theia-integrationrepo. The two package managers disagree on how to do that:pnpm exec; launching it directly fails withERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL.execcommand, so addingexecmakes the web-server exit early.Because the e2e clones the integration repo's default branch (still yarn mid-migration), no single literal command works for both. The web-server failure was invisible in logs (
stdout/stderr: 'ignore'); it only surfaced asProcess from config.webServer was not able to start / exited earlywith zero tests.Fix: detect the cloned repo's package manager via its lockfile (
isYarnRepo, mirroring the existing detection inscripts/setup.ts) and addexeconly for pnpm.This is a temporary workaround, to be removed together with the existing yarn
packageManager-pinning workaround inscripts/setup.tsonce all GLSP repos are on pnpm.Part of: eclipse-glsp/glsp#1636
How to test
pnpm test:theiaagainst a yarn glsp-theia-integration checkout (currentmain) and against a pnpm checkout (the migration branch). The Theia app web-server should boot in both cases (Theia app listening on http://127.0.0.1:3000) and the suite should run.Node / theiaandJava / theiaCI jobs should go green.Follow-ups
isYarnRepobranch here and the yarnpackageManagerpinning inscripts/setup.tsonce the pnpm migration of all GLSP repos is complete.Changelog